import React, { useState } from 'react';
import { ViewButton,ViewModal } from 'view-ui';

export default () => {
    const [ isshowModal, setsshowModal ] = useState(false);

    const showMadl = () => {
        setsshowModal(true);
    }

    const handleOk = () => {
        setsshowModal(false);
      };
    
      const handleCancel = () => {
        setsshowModal(false);
      };

    return (
        <>
            <ViewButton onClick={showMadl}>点击显示弹窗</ViewButton>
            <ViewModal 
                open={isshowModal}
                title="弹窗标题"
                width={520}
                onOk={handleOk}
                onCancel={handleCancel}
            >弹窗</ViewModal>
        </>
    )
}